package com.example.hello;

import com.example.hello.client.Heading.BootstrapHeadingState;
import com.vaadin.ui.AbstractComponent;

public class BootstrapHeading extends AbstractComponent {

    public BootstrapHeading() {
        this(2);
    }

    public BootstrapHeading(String text) {
        this(2, text);
    }

    public BootstrapHeading(int size) {
        this(size, "");
    }

    public BootstrapHeading(int size, String text) {
        this(size, text, "");
    }

    public BootstrapHeading(int size, String text, String subtext) {
        setSize(size);
        setSubtext(subtext);
        setText(text);
    }

    @Override
    protected BootstrapHeadingState getState() {
        return (BootstrapHeadingState) super.getState();
    }

    public int getSize() {
        return getState().getSize();
    }

    public void setSize(int size) {
        getState().setSize(size);
    }

    public String getSubtext() {
        return getState().getSubtext();
    }

    public void setSubtext(String subtext) {
        getState().setSubtext(subtext);
    }

    public String getText() {
        return getState().getText();
    }

    public void setText(String text) {
        getState().setText(text);
    }

}